const state = {

  nestList: [],
  nestIds: '',
  nestStateList:[],
  selfnestList: []
}

const mutations = {
  SAVE_NEST_LIST: (state, data) => {
    state.nestList = data
    let nests = []
    data.forEach(nest => {
      nests.push(nest.nest_code)
    })
    state.nestIds = nests.join(',')
  },
  SAVE_NEST_STATE_LIST: (state, data) => {
    state.nestStateList = data
  },
  SAVE_SELF_NEST_LIST: (state, data) => {
    state.selfnestList = data
  },
}

const actions = {}

export default {
  state,
  mutations,
  actions
}
